<!DOCTYPE HTML>
<html>
<head>
	<meta charset="utf-8">
	<title>绝对定位元素的布局</title>
	<style>
		.box1{
			width:300px;
			height:300px;
			background-color:#bfa;
			position:relative;
		}
		.box2{
			width:100px;
			height:100px;
			background-color:yellow;
			position:absolute;

			margin-left:auto;
			margin-right:auto;
			
			
			

			left:0;
			right:0;
			top:0;
			bottom:0;
		}

	</style>
</head>
<body>
<div class="box1">
	<div class="box2"></div>
</div>
</body>
</html>